package de.dhbw.karlsruhe.picsim.model.actions.impl;

import de.dhbw.karlsruhe.picsim.model.actions.StatusAction;
import org.jetbrains.annotations.NotNull;

/**
 * Created by IntelliJ IDEA.
 * User: goesen
 * Date: Apr 13, 2010
 * Time: 12:25:46 AM
 */
final class StatusActionImpl implements StatusAction {
    private final AffectedStatus status;
    private final boolean value;

    StatusActionImpl(@NotNull final AffectedStatus status, final boolean value) {
        this.status = status;
        this.value = value;
    }

    @NotNull
    @Override
    public AffectedStatus getAffectedStatus() {
        return status;
    }

    @SuppressWarnings({"BooleanMethodNameMustStartWithQuestion"})
    @Override
    public boolean getNewValue() {
        return value;
    }

    @Override
    public void acceptVisitor(@NotNull final Visitor visitor) {
        visitor.visit(this);
    }
}
